
// <copyright file="MiscellaneousHelper.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   This class has few helper methods that are used by Dynamic helper classes
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Reflection.Internal
{
    using System.Collections.Generic;

    using SubhadraSolutions.Sharp.Utils.Validation;

    /// <summary>
    ///     This class has few helper methods that are used by Dynamic helper classes
    /// </summary>
    internal static class MiscellaneousHelper
    {
        #region Methods

        /// <summary>
        /// The add validation error.
        /// </summary>
        /// <param name="propertyDisplayName">
        /// The property display name.
        /// </param>
        /// <param name="index">
        /// The index.
        /// </param>
        /// <param name="errors">
        /// The errors.
        /// </param>
        internal static void AddValidationError(string propertyDisplayName, int index, List<ValidationResult> errors)
        {
            errors.Add(new ValidationResult { ErrorMessage = propertyDisplayName + " should not be left blank/null.", PropertyName = propertyDisplayName, ItemSequenceNumber = index });
        }

        #endregion Methods
    }
}
